package com.example.customclassloader.controller;

import com.example.customclassloader.entity.Teacher;
import com.example.customclassloader.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author xionglei
 * @version 1.0.0
 * 2021年08月23日 09:30
 */
@RestController
@RequestMapping("teacher")
public class TeacherController {

    @Autowired
    private TeacherService teacherService;

    @RequestMapping("getAll")
    public List<Teacher> getAll() {
        return teacherService.getTeachers();
    }
}
